package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

@Getter
@AllArgsConstructor
public enum FeeTypeEnum {

    PREMIUM("2", "再保保费(不含税)"),
    HANDLING_CHARGE("3", "再保手续费"),
    SETTLED_CLAIM("4", "已决赔款"),
            ;

    public static FeeTypeEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }

    private String code;
    private String descr;
}
